<div class="grid_4">   
    <div class="da-panel">
        <div class="da-panel-header">
            <span class="da-panel-title">
                <img alt="" src="<?php echo $this->themeUrl; ?>/files/theme/images/icons/color/monitor.png">
                Quản lý giá
            </span>
        </div>

        <div id="da-ex-tabs" class="ui-tabs ui-widget ui-widget-content ui-corner-all">
            <?php $this->renderPartial('_tabs')?>   

            <div role="grid" class="dataTables_wrapper" id="da-ex-datatable-numberpaging_wrapper">

                <?php
                    $this->widget('zii.widgets.grid.CGridView', array(
                        'id'=>'item-grid',
                        'dataProvider'=>$dataProvider,
                        'filter'=>$model,
                        'template' => "{items}\n{summary}\n{pager}",
                        'summaryCssClass' => 'dataTables_info',
                        'pagerCssClass' => 'dataTables_paginate paging_full_numbers',
                        'itemsCssClass' => 'da-table dataTable',
                        'beforeAjaxUpdate'=>'function(id,options){
                        $("#ajax-loading").fadeIn();    
                        }',
                        'afterAjaxUpdate'=>'function(id,options){
                        $("#ajax-loading").fadeOut();    
                        }',
                        'columns'=>array(
                            array(
                                'name'      =>'id',
                                'filterHtmlOptions' => array('style' => 'width: 40px'),
                            ),
                            array(
                                'name'      =>'name',
                            ),
                            array(
                                'name'      =>'name_en',
                            ),
                            array(
                                'name'      =>'iron',
                                'value'     =>'$data->iron ? $data->iron."k" : "---"',
                                'filter'    => $model->priceData
                            ),
                            array(
                                'name'      =>'laundry_dry',
                                'value'     =>'$data->laundry_dry ? $data->laundry_dry."k" : "---"',
                                'filter'    => $model->priceData
                            ),
                            array(
                                'name'      =>'group',
                                'value'     =>'$data->groupLabel',
                                'filter'    => $model->groupData
                            ),
                            array(
                                'name'      =>'unit',
                                'value'     =>'$data->unitLabel',
                                'filter'    => $model->unitData
                            ),

                            array(
                                'class'=>'CButtonColumn',
                                'template'=>'{update} {delete} ',
                                'buttons' => array(
                                    'update' => array(
                                        'url'=>'$data->getAdminUrl("update")',
                                        'label'=>'Sửa', 
                                        'imageUrl'=>$this->themeUrl.'/files/theme/images/icons/color/pencil.png',
                                    ),
                                    'delete' => array(
                                        'url'=>'$data->getAdminUrl("delete")',
                                        'label'=>'Xóa', 
                                        'imageUrl'=>$this->themeUrl.'/files/theme/images/icons/color/cross.png',
                                    ),
                                ),
                            ),
                        ),
                    )); ?>             
            </div>

        </div>

    </div>
</div>       

<script>
    $(function(){
        $(".datetimepicker input").live('click focus', function(){
            $(this).datepicker({ dateFormat: 'yy-mm-dd' });
        });

    });   
</script>